﻿//全选
function CheckAll(name) {
    //取消反选的选中状态
    if ($("#clearCheck")[0].checked) {
        $("#clearCheck")[0].checked = false;
    }
    var setv = $("#allCheck")[0].checked;
    $("input[name='" + name + "']").each(function (i) {
        this.checked = setv;
    });
}
//反选
function CheckOther(name) {
    //取消全选的选中状态
    if ($("#allCheck")[0].checked) {
        $("#allCheck")[0].checked = false;
    }
    $("input[name='" + name + "']").each(function (i) {
        this.checked = (!this.checked);
    });
}
